package com.pipe.servicepipe.entity.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;

/**
 * @ClassName BasePageQuery
 * @Author HETAO
 * @Date 2020/7/27 19:51
 */
@ApiModel(value = "分页父类",description = "分页父类")
@EqualsAndHashCode
public class BasePageQuery {
    @ApiModelProperty("当前页码")
    private Integer pageNum;

    @ApiModelProperty("每页显示行数")
    private Integer pageSize;

    @ApiModelProperty(value = "操作员")
    private String operator;

    @ApiModelProperty(value = "创建时间")
    private String startTime;

    @ApiModelProperty(value = "结束时间")
    private String endTime;

    public Integer getPageNum() {
        if (this.pageNum < 0 || this.pageNum == null) {
            return 1;
        }
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Integer getPageSize() {
        if (this.pageSize < 0 || this.pageSize == null) {
            return 15;
        }
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }
}
